<%inherit file="base.html" />

<%def name="title()">分类 - 首页</%def>

<div id="blog_list">
    % if entries:
        <ul>
        % for entry in entries:
            <li><a href="/entry/${ entry.entry_slug }/">${ entry.title }</a> | @${ entry.createdTime }</li>
        % endfor
    % else:
        <p>here</p>
    % endif
    <div id="page_link">
        % if page > 1:
            <span id="pre_page"><a href="/?page=${ page - 1 }">上一页</a></span>
        % endif
        <span id="cur_page">${ page } / ${ pages }</span>
        % if page < pages:
            <span id="next_page"><a href="/?page=${ page + 1 }">下一页</a></span>
        % endif
    </div>
</div>

<div id="side_bar">
    <div class="side_bar_component">
        <h2>标签</h2>
        % for tag in tags:
            <span><a href="/tag/${ tag.name }/">${ tag.name }</a></span>
        % endfor
    </div>

    <div class="side_bar_component">
        <h2>目录</h2>
        <ul>
            % for one in categories:
                <li><a href="/category/${ one.slug }/">${ one.name } (${ one.entryNum })</a></li>
            % endfor
        </ul>
    </div>

    <div class="side_bar_component">
        <h2>链接</h2>
        <ul>
            % for one in links:
            <li><a href="${ one.url }" target="_blank">${ one.name }</a></li>
            % endfor
        </ul>
    </div>
</div>

<br class="clearfloat" />
